﻿<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>12-XMediaTest</title>
    <link href="../dist/css/bootstrap.css" rel="stylesheet" />
</head>
<body>
    <script src="../dist/js/jquery.js"></script>
    <script src="../dist/js/popper.js"></script>
    <script src="../dist/js/bootstrap.js"></script>
    <script src="../dist/js/bootstrap-es6.js"></script>
    <script>
        var container = new XContainer({
            container: document.body,
            children: [{
                xtype: 'media',
                imgSrc: '../image/timg.gif',
                imgCls: 'd-flex align-self-start mr-3',
                imgAlt: '靠上',
                children: [{
                    xtype: 'html',
                    html: '<h5>Media heading</h5>'
                }, {
                    xtype: 'html',
                    html: '<p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.</p>'
                }, {
                    xtype: 'media',
                    imgSrc: '../image/timg.gif',
                    imgCls: 'd-flex align-self-center mr-3',
                    imgAlt: '居中',
                    children: [{
                        xtype: 'html',
                        html: '<h5>Media heading</h5>'
                    }, {
                        xtype: 'html',
                        html: '<p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.</p>'
                    }]
                }, {
                    xtype: 'media',
                    imgSrc: '../image/timg.gif',
                    imgCls: 'd-flex align-self-end mr-3',
                    imgAlt: '靠下',
                    children: [{
                        xtype: 'html',
                        html: '<h5>Media heading</h5>'
                    }, {
                        xtype: 'html',
                        html: '<p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.</p>'
                    }]
                }]
            }]
        });
        container.render();
    </script>
</body>
</html>